home *** CD-ROM | disk | FTP | other *** search
Wrap
.bra { .ket } ; $VER: xDM GUI for LZX Registered v2.0 (29.9.95) Cd >ENV:xdmorigcd Set xdmcd "$xdmorigcd" If NOT EXISTS ENV:xdm If NOT EXISTS ENVARC:xdm Set xdm T: Else Copy >NIL: ENVARC:xdm TO ENV: EndIf EndIf If NOT EXISTS ENV:xdmlzx If NOT EXISTS ENVARC:xdmlzx Set xdmlzx T: Else Copy >NIL: ENVARC:xdm TO ENV: EndIf EndIf If NOT EXISTS C:dd Set xdmerror dd Skip errorout EndIf If NOT EXISTS C:PackDev Set xdmerror PackDev Skip errorout EndIf If NOT EXISTS C:LZX Set xdmerror LZX Skip errorout EndIf LAB begin RequestChoice >ENV:xdmaction "xDM v2.0 - The eXtended Disk Masher" "Select Action To Perform" "Compress Disk" "Decompress Disk" "QUIT" If $xdmaction EQ "0" Skip getout EndIf LAB specialmode If $xdmaction EQ "1" RequestChoice >ENV:xdmversion "xDM v2.0 - The eXtended Disk Masher" "Choose Special Mode (if any)" "None" "Low Memory" "BACK" "QUIT" If $xdmversion EQ "0" Skip getout EndIf If $xdmversion EQ "3" Skip begin BACK EndIf If $xdmversion EQ "2" If NOT EXISTS ENV:xdm Set xdmerror "lowmem" Skip errorout EndIf If NOT EXISTS ENV:xdmlzx Set xdmerror "lowmem" Skip errorout EndIf Set xdmmode "lowmem" EndIf EndIf LAB startpack If $xdmaction EQ "1" RequestChoice >ENV:xdmdev "xDM v2.0 - The eXtended Disk Masher" "Select Drive To Compress From" "DF0:" "DF1:" "DF2:" "DF3:" "RAD:" "BACK" "QUIT" If $xdmdev EQ "6" Skip specialmode BACK EndIf EndIf If $xdmaction EQ "2" RequestChoice >ENV:xdmdev "xDM v2.0 - The eXtended Disk Masher" "Select Drive To Decompress To" "DF0:" "DF1:" "DF2:" "DF3:" "RAD:" "BACK" "QUIT" If $xdmdev EQ "6" Skip begin BACK EndIf EndIf If $xdmdev EQ "0" Skip getout EndIf Eval >ENV:xdmseldrive $xdmdev - 1 Set xdmdrive DF$xdmseldrive: If $xdmdev EQ "5" Assign >NIL: RAD: EXISTS If WARN Echo "Mounting RAD:" Mount >NIL: RAD: EndIf Set xdmdrive RAD: EndIf If $xdmaction EQ "1" Skip compress EndIf If $xdmaction EQ "2" Skip decompress EndIf LAB compress FailAt 21 If NOT EXISTS ENV:xdmdd If NOT EXISTS ENVARC:xdmdd Set xdmdd RAM: Else Copy >NIL: ENVARC:xdmdd TO ENV: EndIf EndIf RequestFile >ENV:xdmdest DRAWER "$xdmdd" FILE ".xdm" PATTERN "#?.xdm" TITLE "Select Destination File" NOICONS If FAIL Skip begin BACK EndIf If EXISTS $xdmdest Set xdmerror "fileexists" Skip errorout EndIf FailAt 20 LAB selecttracks RequestChoice >ENV:xdmtracks "xDM v2.0 - The eXtended Disk Masher" "Compress Which Tracks?" "All Tracks" "All AmigaDOS Tracks" "Certain Tracks" "BACK" "QUIT" If $xdmtracks EQ "0" Skip getout EndIf If $xdmtracks EQ "4" Skip begin BACK EndIf If $xdmtracks EQ "3" Echo "Enter start track: " NOLINE Set >NIL: xdmstarttrack ? Echo "Enter end track : " NOLINE Set >NIL: xdmendtrack ? Eval >ENV:xdmskip $xdmstarttrack*22 Eval >ENV:xdmcount $xdmendtrack-$xdmstarttrack*22+22 EndIf LAB beginread Echo "*e[32mxDM v2.0 - © 1995 Adam Chapman*e[0m" Echo "Reading disk image... Please wait!" Cd "$xdm" Date >ENV:xdmdate1 Echo >ENV:xdmtime1 "$xdmdate1" LEN=5 Echo >ENV:xdmmins1 "$xdmtime1" FIRST=1 LEN=2 Echo >ENV:xdmsecs1 "$xdmtime1" LEN=2 If $xdmtracks EQ "3" ChangeTaskPri 5 dd -c$xdmcount -s$xdmskip -r$xdmdrive xDM.dsk ChangeTaskPri 0 List >ENV:xdmfile xDM.dsk LFORMAT %L If $xdmfile EQ "empty" Echo "Please insert disk into drive $xdmdrive" Skip startpack BACK EndIf Else If $xdmtracks EQ "1" ChangeTaskPri 5 PackDev $xdmdrive xDM NC Q ALL Else ChangeTaskPri 5 PackDev $xdmdrive xDM NC Q EndIf ChangeTaskPri 0 Rename >NIL: xDM.pkd xDM.image List >ENV:xdmfile xDM.image LFORMAT %L If FAIL Echo "Please insert disk into drive $xdmdrive" Skip startpack BACK EndIf EndIf Echo "Archiving disk image... Please wait!" If $xdmtracks EQ "3" If $xdmmode EQ "lowmem" LZX -bi16 -bo16 -m -P5 -Qf -U0 -w$xdmlzx -X0 -3 af $xdmdest xDM.dsk ENV:xdmskip ENV:xdmcount Skip contcompress EndIf LZX -m -P5 -Qf -U0 -X0 -3 af $xdmdest xDM.dsk ENV:xdmskip ENV:xdmcount Else If $xdmmode EQ "lowmem" LZX -bi16 -bo16 -m -P5 -Qf -U0 -w$xdmlzx -X0 -3 af $xdmdest xDM.image Skip contcompress EndIf LZX -m -P5 -Qf -U0 -X0 -3 af $xdmdest xDM.image EndIf LAB contcompress Date >ENV:xdmdate2 Echo >ENV:xdmtime2 "$xdmdate2" LEN=5 Echo >ENV:xdmmins2 "$xdmtime2" FIRST=1 LEN=2 Echo >ENV:xdmsecs2 "$xdmtime2" LEN=2 List >ENV:xdmsize $xdmdest LFORMAT %L Eval >ENV:xdmpct 100-($xdmsize*100/901120) If $xdmmins2 GT $xdmmins1 Eval >ENV:xdmtimer ($xdmmins2*60+$xdmsecs2)-($xdmmins1*60+$xdmsecs1) EndIf If $xdmmins1 GT $xdmmins2 Eval >ENV:xdmtimer ($xdmmins2+60*60+$xdmsecs2)-($xdmmins1*60+$xdmsecs1) Else Eval >ENV:xdmtimer ($xdmmins2*60+$xdmsecs2)-($xdmmins1*60+$xdmsecs1) EndIf Echo "Archive size : *e[1;32m$xdmsize*e[0m bytes" Echo "Percentage Saving : *e[1;32m$xdmpct*e[0m *e[1;32m%*e[0m" If "$xdmtimer" NOT EQ "Mismatched parenthesis" Echo "Mashing time : *e[1;32m$xdmtimer*e[0m seconds" EndIf Echo "*nProcess complete!" Skip returnout LAB decompress FailAt 21 If NOT EXISTS ENV:xdmsd If NOT EXISTS ENVARC:xdmsd Set xdmsd RAM: Else Copy >NIL: ENVARC:xdmsd TO ENV: EndIf EndIf RequestFile >ENV:xdmdest DRAWER "$xdmsd" PATTERN "#?.xdm" TITLE "Select Archive" NOICONS If FAIL Skip begin BACK EndIf FailAt 20 List >ENV:xdmcheck $xdmdest QUICK NOHEAD Echo >ENV:xdmcheck2 "$xdmcheck" LEN=3 If $xdmcheck2 NOT EQ "xdm" Set xdmerror "notxdm" Skip errorout EndIf If NOT EXISTS $xdmdest Set xdmerror "nofile" Skip errorout EndIf If $xdmdev NOT EQ "5" RequestChoice >ENV:xdmdecompcont "xDM v2.0 - The eXtended Disk Masher" "Ensure disk is in $xdmdrive" "Continue" "BACK" "QUIT" EndIf If $xdmdecompcont EQ "0" Skip getout EndIf If $xdmdecompcont EQ "2" Skip decompress BACK EndIf Date >ENV:xdmdate1 Echo >ENV:xdmtime1 "$xdmdate1" LEN=5 Echo >ENV:xdmmins1 "$xdmtime1" FIRST=1 LEN=2 Echo >ENV:xdmsecs1 "$xdmtime1" LEN=2 Echo "*e[32mxDM v2.0 - © 1995 Adam Chapman*e[0m" Echo "Decompressing disk image... Please wait!" LZX >NIL: -m -P5 -X0 x $xdmdest ENV: xdmcount xdmskip LZX -m -P5 -X0 x $xdmdest "$xdm" xDM.dsk xDM.image If ERROR Set xdmerror "notxdm" Skip errorout EndIf FailAt 20 Cd "$xdm" If NOT EXISTS xDM.dsk If NOT EXISTS xDM.image Set xdmerror "notxdm" Skip errorout EndIf EndIf If EXISTS xDM.dsk If NOT EXISTS ENV:xdmcount Set xdmunpack 1 Set xdmcount 1760 Set xdmskip 0 Skip unpackcont EndIf Set xdmunpack 2 EndIf If EXISTS xDM.image Set xdmunpack 3 EndIf LAB unpackcont Echo "Writing disk image... Please wait!" If $xdmunpack EQ "3" ChangeTaskPri 5 PackDev xDM.image $xdmdrive NC Q ETDF ChangeTaskPri 0 Else ChangeTaskPri 5 dd -c$xdmcount -s$xdmskip -w$xdmdrive xDM.dsk ChangeTaskPri 0 EndIf Echo "Process complete!" DiskChange $xdmdrive Date >ENV:xdmdate2 Echo >ENV:xdmtime2 "$xdmdate2" LEN=5 Echo >ENV:xdmmins2 "$xdmtime2" FIRST=1 LEN=2 Echo >ENV:xdmsecs2 "$xdmtime2" LEN=2 If $xdmmins2 GT $xdmmins1 Eval >ENV:xdmtimer ($xdmmins2*60+$xdmsecs2)-($xdmmins1*60+$xdmsecs1) EndIf If $xdmmins1 GT $xdmmins2 Eval >ENV:xdmtimer ($xdmmins2+60*60+$xdmsecs2)-($xdmmins1*60+$xdmsecs1) Else Eval >ENV:xdmtimer ($xdmmins2*60+$xdmsecs2)-($xdmmins1*60+$xdmsecs1) EndIf If "$xdmtimer" NOT EQ "Mismatched parenthesis" Echo "Decompression time : *e[1;32m$xdmtimer*e[0m seconds" EndIf Echo "*nProcess complete!" Skip returnout LAB errorout If $xdmerror EQ "fileexists" Echo "*nSorry, but that xDM archive already exists." Echo "Please give it another filename." Skip returnout Else If $xdmerror EQ "nofile" Echo "*nSorry, that file does not exist." Echo "Please select an existing xDM archive." Skip returnout EndIf If $xdmerror EQ "lowmem" Echo "*nSorry, you have selected a mode which suggests you have a low memory" Echo "situation. However, you do not have the low-memory variable *"xdmlzx*" set" Echo "in your ENV: or ENVARC: directories. Please refer to the documentation or" Echo "re-install xDM, this time setting the *"xdmlzx*" low-memory variable to a" Echo "location somewhere on a harddrive partition with at least 1mb free.*n" Skip conterror EndIf If $xdmerror EQ "notxdm" Echo "*nSorry, the file you are trying to unpack is not an xDM archive." Echo "Please select a valid archive and try again." Skip returnout EndIf Echo "*nSorry, but I cannot find *"$xdmerror*" in your C: directory." Echo "Please install xDM or *"$xdmerror*" again." EndIf LAB conterror Cd "$xdm" Delete >NIL: xDM.dsk xDM.image Cd ENV: Delete >NIL: xdmaction xdmdev xdmseldrive xdmdest xdmtracks xdmdecompcont xdmskip xdmcount xdmfile xdmsize xdmpct xdmtimer xdmorigcd xdmversion xdmcheck xdmcheck2 xdmdate#? xdmtime#? xdmmins#? xdmsecs#? Cd "$xdmcd" UnSet xdmdrive UnSet xdmcount UnSet xdmskip UnSet xdmstarttrack UnSet xdmendtrack UnSet xdmmode UnSet xdmunpack UnSet xdmcd UnSet xdmerror UnSet xdm UnSet xdmsd UnSet xdmlzx FailAt 21 Quit 20 LAB returnout Cd "$xdm" Delete >NIL: xDM.dsk xDM.image Cd ENV: Delete >NIL: xdmaction xdmdev xdmseldrive xdmdest xdmtracks xdmdecompcont xdmskip xdmcount xdmfile xdmsize xdmpct xdmtimer xdmversion xdmcheck xdmcheck2 xdmdate#? xdmtime#? xdmmins#? xdmsecs#? UnSet xdmdrive UnSet xdmcount UnSet xdmskip UnSet xdmstarttrack UnSet xdmendtrack UnSet xdmmode UnSet xdmunpack UnSet xdm UnSet xdmsd UnSet xdmlzx Skip begin BACK LAB getout Cd "$xdm" Delete >NIL: xDM.dsk xDM.image Cd ENV: Delete >NIL: xdmaction xdmdev xdmseldrive xdmdest xdmtracks xdmdecompcont xdmskip xdmcount xdmfile xdmsize xdmpct xdmtimer xdmorigcd xdmversion xdmcheck xdmcheck2 xdmdate#? xdmtime#? xdmmins#? xdmsecs#? Cd "$xdmcd" UnSet xdmdrive UnSet xdmcount UnSet xdmskip UnSet xdmstarttrack UnSet xdmendtrack UnSet xdmmode UnSet xdmunpack UnSet xdm UnSet xdmsd UnSet xdmlzx UnSet xdmerror UnSet xdmcd